{% load list_tags %}

<table class="grid-cells" id="resultingDataTable" style="display: none;">
    <thead>
        <tr>
            <th>index</th>
            {% for key in keys %}
                <th>{{ key }}</th>
            {% endfor %}
        </tr>
    </thead>
    <tbody>
        {% for data_line in result %}
            <tr>
                <th>{{ forloop.counter0 }}</th>
                {% for item in data_line %}
                    <td>{{ item }}</td>
                {% endfor %}
            </tr>
        {% endfor %}
    </tbody>
</table>